<!DOCTYPE html>
<!--[if IE 8]>			<html class="ie ie8"> <![endif]-->
<!--[if IE 9]>			<html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!-->	<html> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<title>{$site_name} </title>
	<meta name="keywords" content="{$site_seo_keywords}" />
	<meta name="description" content="{$site_seo_description}">
	<include file="Public:head" />
</head>
<body class="body-white">
<div class="wrap">
	<include file="Public:nav" />
	<div id="main-cmf">
		<div class="breadcrumb-wrapper">
			<div class="container">
				<div class="row">
					<div class="col-lg-6 col-md-6 col-xs-12 col-sm-6">
						<h2 class="title">个人中心</h2>
					</div>
					<div class="col-lg-6 col-md-6 col-xs-12 col-sm-6">
						<div class="breadcrumbs pull-right">
							<ul>
								<li>当前位置:</li>
								<li><a href="__ROOT__/">首页</a></li>
								<li><a href="{:U('Center/index')}">个人中心</a></li>
								<li>编辑资料</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="content">
			<div class="container">
				<div class="row">
					<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
						<include file="Public:usernav"/>
					</div>
					<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
						<div id="center-content" style="padding:20px">
							<div class="row">
								<form class="form-light form-horizontal" id="runedit" action="{:U('Center/runedit')}" method="post">
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">昵称</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<input type="text" class="form-control" id="input-user_nicename" placeholder="昵称" name="member_list_nickname" value="{$member_list_nickname}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">性别</label>
										<php>
											$sexs=array("1"=>"程序猿","2"=>"程序媛","3"=>"保密");
										</php>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<select id="input-sex" name="member_list_sex" class="form-control">
												<foreach name="sexs" item="vo">
													<php>$sexselected=$key==$member_list_sex?"selected":"";</php>
													<option value="{$key}" {$sexselected}>{$vo}</option>
												</foreach>
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">电话</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<input type="text" class="form-control" id="member_list_tel" name="member_list_tel" value="{$member_list_tel}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">个人网站</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<input type="text" class="form-control" id="input-user_url" placeholder="http://www.rainfer.cn" name="user_url" value="{$user_url}">
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">个性签名</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<textarea id="input-signature" placeholder="个性签名" class="form-control" name="signature">{$signature}</textarea>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">省份/直辖市</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<select name="member_list_province" class="form-control" id="province" onChange="loadRegion('province',2,'city','{:U('Admin/Ajax/getRegion')}');">
										<option value="0">省份/直辖市</option>
										<volist name="province" id="vo">
											<option value="{$vo.id}" <if condition="$member_list_province eq $vo['id']">selected</if>>{$vo.name}</option>
										</volist>
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">市/县</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<select name="member_list_city" class="form-control" id="city"  onchange="loadRegion('city',3,'town','{:U('Admin/Ajax/getRegion')}');">
										<option  value="0">市/县</option>

										<php>
											$city=M('Region')->where(array('pid'=>$member_list_province))->select();
										</php>
										<foreach name="city" item="v">
											<option <if condition="$member_list_city eq $v['id']">selected</if> value="{$v.id}">{$v.name}</option>
										</foreach>

									</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">镇/区</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<select name="member_list_town" class="form-control" id="town">
										<option value="0">镇/区</option>
										<php>
											$town=M('Region')->where(array('pid'=>$member_list_city))->select();
										</php>
										<volist name="town" id="vy">
											<option <if condition="$member_list_town eq $vy['id']">selected</if> value="{$vy.id}">{$vy.name}</option>
										</volist>
									</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label"></label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<button class="btn btn-primary">保存</button>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<include file="Public:footer"/>
</div>
<include file="Public:section"/>
<include file="Public:scripts"/>
<script type="text/javascript" src="__PUBLIC__/assets/js/region.js"></script>
<script src="__PUBLIC__/assets/js/jquery.form.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript">
//添加操作
$(function(){
	$('#runedit').ajaxForm({
		success: complete, // 这是提交后的方法
		dataType: 'json'
	});
	function complete(data){
		if(data.status==1){
			layer.alert(data.info, {icon: 6}, function(index){
				layer.close(index);
				window.location.href=data.url;
			});
		}else{
			layer.alert(data.info, {icon: 5}, function(index){
				layer.close(index);
			});
		}
		return false;
	}
});
</script>
</body>
</html>